home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-21 | 6.7 KB | 220 lines | [TEXT/MMCC] |
- /******************************************************************************
- **
- ** Project Name: InstallerMaker Extensions for IM 3.0
- ** File Name: IMExtensionsFor3_0.h
- **
- ** Copyright© 1994-1996 Aladdin Systems, inc.
- **
- **
- ** Description: Header for InstallerMaker code resources. Note that
- ** if you compile for Symantec or Metrowerks code
- ** resources, you'll need your code resource's entry point
- ** to be declared as "main". So to use this header correctly,
- ** you'll need to "redefine" the appropriate function name.
- ** For the IBeg, this would look something like this:
- **
- ** #ifndef __IM3_EXTENSIONS
- ** #define IBEG_MAIN main
- ** #include "IMExtensionsFor3_0.h"
- ** #endif
- **
- ** We also recommend looking at the enclosed "A4Globals.h"
- ** header file, which makes it possible (1) to write a code
- ** resource that compiles without change in both the Metrowerks
- ** and Symantec environments, and (2) can make it easier for
- ** you to test your code by allowing the same function to be
- ** called as "main" if compiling as a code resource, or some
- ** other name if you are calling your code from within a
- ** test program. See our sample code for more about this.
- **
- **
- *******************************************************************************
- ** A U T H O R I D E N T I T Y
- *******************************************************************************
- **
- ** Initials Name
- ** -------- -----------------------------------------------
- ** RMT Robert Thorne
- **
- **
- *******************************************************************************
- ** L E G A L N I C E T I E S
- *******************************************************************************
-
- This source code is (c) 1995-1996 Aladdin Systems, Inc. You are free to use it
- in connection with your own products and distribute it in either source code
- or object code form. However, this source code and accompanying written
- materials (including instructions for use) are provided "as is" without
- warranty of any kind. Further, Aladdin Systems does not warrant, or make
- representations regarding the use, or the results of the use, of the source
- code or written materials in terms of correctness, accuracy, reliability,
- currentness, or otherwise. No oral or written information or advice given
- by Aladdin Systems or its employees shall create a warranty, and you may not
- rely on such information or advice.
-
- Neither Aladdin Systems nor anyone else who has been involved with the
- creation, production, or delivery of the source code shall be liable for
- any direct, indirect, consequential, or incidental damages (including damages
- for loss of business profits, business interruption, loss of business
- information, and the like) arising out of the use or the inability to use the
- source code even if Aladdin Systems has been advised of the possibility of
- such damages. Because some states do not allow the exclusion or limitation
- of liability for consequential or incidental damages or the limitations of
- duration of implied warranty, the above limitations may not apply to you.
-
-
- *******************************************************************************
- ** R E V I S I O N H I S T O R Y
- *******************************************************************************
- **
- ** Date Time Author Description
- ** -------- ----- ------ ---------------------------------------------
- ** 03/14/94 RMT First draft for IM 1.0.1 and early 2.0ß
- ** 04/07/94 RMT Added "called after" parameter for 2.0b3
- ** 12/30/94 RMT Converted to IM 3.0 calls as of 12/28/94
- ** 01/03/95 RMT Added IDst and renamed the info structure
- ** 07/26/95 RMT Changed ILoc calling conventions.
- **
- ******************************************************************************/
-
- /*****
-
- // Extension Prototypes. Note that the appropriate code resource build
- // needs to #define the appropriate Ixxx_MAIN as "main". For example, to
- // build an IBeg code resource in CodeWarrior, do the following:
-
- #define IBEG_MAIN main
- #include "IMExtensions256.h"
-
- // Resource ID for all IM 3.0 code is 256. Use of any other value may give
- // you and your users indigestion!!
-
-
- ******/
-
- #ifndef __IM3_EXTENSIONS
- #define __IM3_EXTENSIONS
-
-
-
- /****
-
- IMEnvironsRec Structure
- =======================
-
- This structure is used by various atoms.
-
- Unless otherwise noted, the meaning of the fields is:
-
- packages: an array of four long unsigned integers, used to represent which
- packages are selected.
-
- The userVol/userDir specifies the user selected folder or user selected volume.
- In the latter case, userDir will be 2L.
-
- The userSysVol/userSysDir specifies the potentially blessed folder on the user
- specified system vol, if the developer allows the user to make this choice.
- Otherwise, it specifies the blessed folder on the startup volume.
-
- ****/
-
- typedef struct {
- unsigned long *packages ;
- short userVol;
- long userDir;
- short userSysVol;
- long userSysDir;
- } IMEnvironsRec ;
-
-
- // For ICnd, IMid:
- #define kOkToContinue 0
- #define kSkipThisItem 1
- #define kCancelInstallation 2
-
- // State codes for IMid 256
- enum {
- IMID_BEFORE = 0,
- IMID_AFTER = 1,
- IMID_BEFORE_DELETE = 2,
- IMID_BEFORE_COPY = 4,
- IMID_AFTER_COPY = 5,
- IMID_BEFORE_MOVE = 6,
- IMID_AFTER_MOVE = 7
- };
-
-
- // Flags for ICnd
- #define kCnd2Flag 4
- #define kCnd1Flag 2
- #define kCnd0Flag 1
-
- // Status codes to return from an ILoc 256
- enum {
- kILoc_UseParameters = 0, // point to the folder referenced in the parameters
- kILoc_ChooseDefaultUserFolder = 1, // If called to set user folder
- kILoc_SkipThisItem = 1, // If called as a custom destination
- kILoc_AbortInstall = 2
- } ;
-
-
- // For IFst, IBeg, IEnd
- #define kWasNotAborted 0
- #define kWasAborted 1
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
-
- pascal short IFST_MAIN ( unsigned long *refCon ) ;
-
-
- pascal short IBEG_MAIN (unsigned char *pw ,
- unsigned long *refCon ) ;
-
-
- pascal short ICND_MAIN (short flags,
- unsigned long *packages,
- unsigned long *refcon) ;
-
-
- pascal void IPKG_MAIN( unsigned long *packages,
- unsigned long *refcon) ;
-
-
-
- pascal short IMID_MAIN (IMEnvironsRec *environs,
- short *destVol,
- long *destDir,
- short isFolder,
- unsigned char *name,
- unsigned long creationDate,
- unsigned long modificationDate,
- OSType type,
- OSType creator,
- short after,
- short tag,
- unsigned long *refcon ) ;
-
-
- pascal short IEND_MAIN (short abort,
- IMEnvironsRec *environs,
- short *restartFlag,
- unsigned long *refcon ) ;
-
-
- pascal short ILOC_MAIN ( IMEnvironsRec *environs,
- short *destVol,
- long *destDir,
- short *killDestinationPrompt,
- unsigned long *refcon );
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-